home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / ov143b.zip / DIALOG.H < prev    next >
C/C++ Source or Header  |  1993-01-04  |  2KB  |  53 lines

  1. /*  005  28-May-87  dialog.h
  2.  
  3.         Copyright (c) 1987 by Blue Sky Software.  All rights reserved.
  4. */
  5.  
  6. /* #define DBX_MACROS */       /* include to make some rtns macros */
  7.  
  8. /* define the Dialog BOX structure/type */
  9.  
  10. typedef struct _dbox {
  11.    unsigned char row;                  /* start row */
  12.    unsigned char col;                  /* start column */
  13.    unsigned char nrows;                /* # rows */
  14.    unsigned char ncols;                /* # columns */
  15.    char *save;                         /* pointer to save area or NULL */
  16.    char *title;                        /* pointer to title text or NULL */
  17. } D_BOX;
  18.  
  19. /* define the Dialog FIELD structure/type */
  20.  
  21. typedef struct _dfld {
  22.    unsigned char row;                  /* field start row (offset in box) */
  23.    unsigned char col;                  /* field start col (offset in box) */
  24.    unsigned char len;                  /* max length of value to read     */
  25.    unsigned char pos;                  /* initial cursor pos when reading */
  26.    char *value;                        /* field value/buffer              */
  27. } D_FLD;
  28.  
  29. /* valid options to dbx_open() */
  30.  
  31. #define DBX_SAVE (1)                   /* save current image option */
  32.  
  33. #ifdef DBX_MACROS              /* declare rtns as macros if DBX_MACROS set */
  34.  
  35. /* dbx_*() routines implemented as macros */
  36.  
  37. #define dbx_disp(dbp,s,ro,co) disp_str_at(s,((dbp)->row)+ro,((dbp)->col)+co)
  38. #define dbx_goto(dbp,ro,co)   gotorc(((dbp)->row)+ro,((dbp)->col)+co)
  39. #endif
  40.  
  41. /* function declaration stuff */
  42.  
  43. #define ALTCALL pascal         /* alternate calling method reduces overhead */
  44.  
  45. void ALTCALL dbx_open(D_BOX *, unsigned int);
  46. void ALTCALL dbx_close(D_BOX *);
  47. char * ALTCALL dbx_rdfld(D_BOX *, D_FLD *);
  48.  
  49. #ifndef DBX_MACROS
  50. void ALTCALL dbx_disp(D_BOX *, char *, int, int);
  51. void ALTCALL dbx_goto(D_BOX *, int, int);
  52. #endif
  53.